import mindspore as ms
from mindspore import numpy as msnp
from mindspore import Tensor, set_context
import numpy as np

set_context(mode=0, device_target="Ascend", device_id=7)

a = np.array(range(1, 11)).reshape(5, 2)
# print(a.shape)
b = np.array([1, 0, 1, 0, 1]).reshape(-1, 1)
# print(b.shape)


# input_a = Tensor(a, ms.int8)
# print(input_a.shape)

# need_value = msnp.where(Tensor(b[:, 0])==1, Tensor(a), 0)

# print(need_value)

inp_a = Tensor(a)
inp_b = Tensor(b)
print(inp_a*inp_b)